package chapter4.No4_1_使用reentrantLock类.demo8;

/**
 * !
 *
 * @author liujian
 * @version 2016/11/21 0021
 */
public class ThreadP extends Thread {
    P p;

    public ThreadP(P p) {
        this.p = p;
    }

    @Override
    public void run() {
        try {
            while(true) {
                p.sc();
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
